<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script>
import global from "@/global";
export default {
  name: "App",
  created() {
    this.$message.loading = (message = null) => {
      if (message == null) message = "加载中...";
      return this.$message({
        iconClass: "el-icon-loading",
        duration: 0,
        center: true,
        message: message,
        type: "info"
      });
    };
  },
  beforeDestroy() {
    global.clearAll();
  }
}
</script>

<style lang="scss">
body {
  height: 100vh;
}
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100vh;
  text-align: center;
  color: #2c3e50;
}

//消除默认风格
* {
  margin: 0;
  padding: 0;
}
a {
  text-decoration: none;
  color: black;
}
input {
  background: none;
  outline: none;
  border: none;
}

//版心
.w {
  margin: 0 auto;
  width: 1100px;
}
</style>
